package annotations;
import java.lang.reflect.*;
import java.util.*;
public class UseCaseTracker {
    public static void trackUseCase(List<Integer> useCases,Class<?> cl){
        for(Method m:cl.getDeclaredMethods()){
            UseCase uc=m.getAnnotation(UseCase.class);
            if(uc!=null){
                System.out.println("Found Use Case:"+uc.id()+" "+uc.description());
                useCases.remove(new Integer(uc.id()));
            }
        }
        for(int i:useCases){
            System.out.println("Warning: Missing use case -"+i);
        }
    }

    public static void main(String[] args) {
        List<Integer> useCase=new ArrayList<Integer>();
        Collections.addAll(useCase,47,48,49,50);
        trackUseCase(useCase,PasswordUtils.class);
    }
}
